package LuoGu.枚举.弹珠;


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.StreamTokenizer;

public class Main {
    public static void main(String[] args) throws IOException {
        StreamTokenizer st = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
        st.nextToken();
        int n = (int) st.nval;
        int [][] temp = new int [n][n];
        boolean flag = false;
        for(int i=0;i<n;i++){
            for(int j=0;j<n;j++){
                st.nextToken();
                temp[i][j] = (int) st.nval;
                if(temp[i][j]==0) flag = true;
            }
        }
        long ans = 0;
        for(int i=0;i<n;i++){
            for(int j=0;j<n;j++){
                if(temp[i][j]==0){
                    int x = 0;
                    int y = 0;
                    long tempans = 0;
                    while(x<n){
                        if(temp[i][x]!=0) tempans+=temp[i][x];
                        x++;
                    }
                    while (y<n){
                        if(temp[y][j]!=0) tempans+=temp[y][j];
                        y++;
                    }
                    ans = Math.max(ans,tempans);
                }
            }
        }
        if(flag) System.out.print(ans);
        else System.out.print("Bad Game!");
    }
}
